package asteroids.model.programs.Expression;

import be.kuleuven.cs.som.annotate.Basic;

/**
* 
* @version 0.3
* @author  Tandan Sunil, Van Deun Luca
*
*/
public abstract class UnaryCalculationExpression extends CalculationExpression {

	public UnaryCalculationExpression(int line, int column ,Expression e) throws IllegalArgumentException{
		super(line, column);
		if(!canHaveAsExpression(e)){
			throw new IllegalArgumentException("Invalid expression, type must be double");
		}
		this.e= (IDoubleExpression) e;
	}
	
	private IDoubleExpression e;
	/**
	 * Return the expression of this calculation expression.
	 * 
	 */
	@Basic
	public IDoubleExpression getExpression(){
		return e;
	}
	
	
}
